package com.bite.system.domain.exam.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.time.LocalDateTime;

@Data
public class ExamSaveDTO {

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(description = "竞赛id")
    private Long examId;

    @Schema(description = "竞赛标题")
    @NotBlank(message = "竞赛标题不能为空")
    private String title;

    @Schema(description = "竞赛开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "竞赛开始时间不能为空")
    private LocalDateTime startTime;

    @Schema(description = "竞赛结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "竞赛结束时间不能为空")
    private LocalDateTime endTime;

    private Integer status;
}